<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Hadoop & Spark 大数据平台</title>
	<link rel="stylesheet" href="bootstrap.min.css">
	<link type="image/x-icon" rel="shortcut icon" href="favicon.ico" />
</head>
<body>
	<div class="container-fluid">
		<div class="row"><img src="bb.jpg" style="width:100%;height:100%;" alt="Hadoop & Spark 大数据平台"></div><br/>
		<div class="container">
			<div class="row"><h3><strong>Hadoop & Spark 大数据平台</strong></h3></div><br/>
			<!-- 分类 / 聚类 / 回归 -->
			<div class="col-md-3 panel-group" id="accordion">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h4 class="panel-title">
							<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
								分类-材料分类<br>【决策树/朴素贝叶斯】
							</a>
						</h4>
					</div>
					<div id="collapseOne" class="panel-collapse collapse in">
						<div class="panel-body">
							<ul class="list-group">
								<li class="list-group-item"><a id="fl" href="#">NaiveBayes/DecisionTree模型训练</a></li>
								<li class="list-group-item"><a id="flResult" href="#">NaiveBayes/DecisionTree模型训练结果</a></li>
								<li class="list-group-item"><a id="NaiveBayesTime" href="#">NaiveBayes时间性能</a></li>
								<li class="list-group-item"><a id="DecisionTreeClassify" href="#">DecisionTree参数调优</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h4 class="panel-title">
							<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
								回归-自行车租赁
							</a>
						</h4>
					</div>
					<div id="collapseTwo" class="panel-collapse collapse">
						<div class="panel-body">
							<ul class="list-group">
								<li class="list-group-item"><a id="hg" href="#">DecisionTree模型训练</a></li>
								<li class="list-group-item"><a id="hgTest" href="#">DecisionTree模型测试</a></li>
								<li class="list-group-item"><a id="hgResult" href="#">DecisionTree模型训练结果</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h4 class="panel-title">
							<a data-toggle="collapse" data-parent="#accordion" href="#collapseFour">
								回归-超导转变温度预测<br>[k-折交叉验证]
							</a>
						</h4>
					</div>
					<div id="collapseFour" class="panel-collapse collapse">
						<div class="panel-body">
							<ul class="list-group">
								<li class="list-group-item"><a id="chaodao" href="#">DecisionTree模型训练</a></li>
								<li class="list-group-item"><a id="chaodaoResult" href="#">DecisionTree模型训练结果</a></li>
								<li class="list-group-item"><a id="chaodaoDecisionTree" href="#">DecisionTree参数调优</a></li>
							</ul>
						</div>
					</div>
				</div>
				<div class="panel panel-default">
					<div class="panel-heading">
						<h4 class="panel-title">
							<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
								聚类-电影类型
							</a>
						</h4>
					</div>
					<div id="collapseThree" class="panel-collapse collapse">
						<div class="panel-body">
							<ul class="list-group">
								<li class="list-group-item"><a id="jl" href="#">KMeans模型训练</a></li>
								<li class="list-group-item"><a id="jlResult" href="#">KMeans模型训练结果</a></li>
								<li class="list-group-item"><a id="jlKMeans" href="#">KMeans参数调优</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
			<div class="col-md-9">
				<div id="display" style="border:1px solid #eee;">
					<h4><strong>数据集</strong></h4><hr>
					<div id="displayData"></div>
					<div id="displayButton"></div>
				</div>
				<div style="border:1px solid #eee;">
					<h4><strong>结果</strong></h4><hr>
					<div id="displayResult"></div>
				</div>
			</div>
		</div>
	</div>

	<!-- regressionModal -->
	<div class="modal fade in" id="regressionModal" tabindex="-1" role="dialog" aria-labelledby="regressionModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
					<h4 class="modal-title" id="regressionModalLabel"><strong>Notes</strong></h4>
				</div>
				<div class="modal-body">
					<strong>准备数据： LabeledPoint(cnt:每小时自行车租用量,
						<br>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						np.array(2, 14)[季节, 年份, 月份, ..., 湿度, 风速])
					</strong>
						<br>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<strong>80% train data + 20% test data</strong><br>
					<strong>训练模型： API-DecisionTree.trainRegressor(trainData, ..., 树深度, 最大划分数, ...)</strong><br>
					<strong>评估性能： mse均方误差, rmse均方根误差</strong><br>
					<strong>改进模型： 变换目标变量, 调整参数-树深度/最大划分数[10, 16]</strong>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-primary" data-dismiss="modal"><strong>Close</strong></button>
				</div>
			</div>
		</div>
	</div>

	<script src="jquery-1.11.3.min.js"></script>
	<script src="bootstrap.min.js"></script>
	<script>
		var base=".", language = "en_US";
	</script>
	<script src="toast.js"></script>
	<script>
		$(function(){
// 分类-材料分类
	// 训练
			$('#fl').click(function(){
				$('#displayData').html('<table class="table-hover table-bordered table-striped">'+
					'<caption data-toggle="modal">Classification</caption>'+
					'<tr>'+
						'<th>Label</th>'+
						'<th>Data</th>'+
					'</tr>'+
					'<tr>'+
						'<td>类别</td>'+
						'<td>分类数据</td>'+
					'</tr>'+
					'<tr>'+
						'<td>0</td>'+
						'<td>9.5 4.5 25.5 2.926 1.283 2.85 1.589 1.903 3.75 0.439 3.136 5.667 1.155 0.39</td>'+
					'</tr>'+
					'<tr>'+
						'<td>1</td>'+
						'<td>10 4 26 3.08 1.35 3 1.605 1.893 3.667 0.448 3.197 5.778 1.216 0.417</td>'+
					'</tr>'+
					'<tr>'+
						'<td>2</td>'+
						'<td>9.33 2 26 2.874 1.26 2.199 1.853 1.943 4 0.448 3.197 5.778 1.135 0.357</td>'+
					'</tr>'+
				'</table>');
				$('#displayButton').html('<button class="btn btn-success form-control" id="out">测试</button>');
				$('#displayResult').html('');
				$('#out').click(function(){
					Toast.success("Please Wait just a minute for the backend resource preparing the result!");
					$('#displayResult').html("请稍后...");
					$.ajax({
						url:"classification.php",
						type:"post",
						success:function(data){
							Toast.success("Success!");
							$.ajax({
								url:"getComparisonOfNaiveBayesAndDecisionTree.txt",
								type:'post',
								success:function(data){
									$('#displayResult').html(data);
								},
								error:function(){
									Toast.error("get info fail!");
									$('#displayResult').html("Fail!");
								}
							});
						}
					})
				});
			});
	// 结果
			$('#flResult').click(function(){
				$('#displayResult').html('');
				$.ajax({
					url:"getComparisonOfNaiveBayesAndDecisionTree.txt",
					type:'post',
					success:function(data){
						$('#displayResult').html(data);
					},
					error:function(){
						Toast.error("get info fail!");
						$('#displayResult').html("Fail!");
					}
				});
			});
	// DecisionTree调优
			$('#DecisionTreeClassify').click(function(){
				$('#displayResult').html('<img src="DecisionTreeClassificationModelBins.png" alt="Decision Tree Result Bins"/>');
				$('#displayResult').append('<img src="DecisionTreeClassificationModelDepth.png" alt="Decision Tree Result Depth"/>');
			});
	// NaiveBayes时间性能
			$('#NaiveBayesTime').click(function(){
				$('#displayResult').html('<img src="TimeMeasureNaiveBayes.png" alt="NaiveBayes时间性能"/>');
			});

// 回归-自行车租赁
	// 训练			
			$('#hg').click(function(){
				$('#displayData').html('<table class="table-hover table-bordered table-striped">'+
					'<caption data-toggle="modal" data-target="#regressionModal">Bike Renting</caption>'+
					'<tr>'+
						'<th>instant</th>'+
						'<th>dteday</th>'+
						'<th>season</th>'+
						'<th>yr</th>'+
						'<th>mnth</th>'+
						'<th>hr</th>'+
						'<th>holiday</th>'+
						'<th>weekday</th>'+
						'<th>workingday</th>'+
						'<th>weathersit</th>'+
						'<th>temp</th>'+
						'<th>atemp</th>'+
						'<th>hum</th>'+
						'<th>windspeed</th>'+
						'<th>cnt</th>'+
					'</tr>'+
					'<tr>'+
						'<td>记录ID</td>'+
						'<td>时间</td>'+
						'<td>季节</td>'+
						'<td>年份</td>'+
						'<td>月份</td>'+
						'<td>当天时刻</td>'+
						'<td>是否为节假日</td>'+
						'<td>周几</td>'+
						'<td>当天是否为工作日</td>'+
						'<td>天气类型参数</td>'+
						'<td>气温</td>'+
						'<td>体感温度</td>'+
						'<td>湿度</td>'+
						'<td>风速</td>'+
						'<td>目标变量</td>'+
					'</tr>'+
					'<tr>'+
						'<td>1</td>'+
						'<td>2011-01-01</td>'+
						'<td>1</td>'+
						'<td>0</td>'+
						'<td>1</td>'+
						'<td>0</td>'+
						'<td>0</td>'+
						'<td>6</td>'+
						'<td>0</td>'+
						'<td>1</td>'+
						'<td>0.24</td>'+
						'<td>0.2879</td>'+
						'<td>0.81</td>'+
						'<td>0</td>'+
						'<td>16</td>'+
					'</tr>'+
					'<tr>'+
						'<td>2</td>'+
						'<td>2011-01-01</td>'+
						'<td>1</td>'+
						'<td>0</td>'+
						'<td>1</td>'+
						'<td>1</td>'+
						'<td>0</td>'+
						'<td>6</td>'+
						'<td>0</td>'+
						'<td>1</td>'+
						'<td>0.22</td>'+
						'<td>0.2727</td>'+
						'<td>0.8</td>'+
						'<td>0</td>'+
						'<td>140</td>'+
					'</tr>'+
				'</table>');
				$('#displayButton').html('<button class="btn btn-success form-control" id="out">测试</button>');
				$('#displayResult').html('');
				$('#out').click(function(){
					Toast.success("Please Wait just a minute for the backend resource preparing the result!");
					$('#displayResult').html("请稍后...");
					$.ajax({
						url:'regressionBike.php',
						type:'post',
						success:function(data){
							Toast.success("Success!");
							$.ajax({
								url:"getDecisionTreeRegressionMseAndRmsle.php",
								type:'post',
								success:function(data){
									data = JSON.parse(data);
									$('#displayResult').html("mse均方误差:" + data[0]
										+ "<br>rmse均方根误差:" + data[1]);
									$('#displayResult').append('<img src="DecisionTree.png" alt="Decision Tree Result"/>');
								},
								error:function(){
									Toast.error("get mse & rmsle fail!");
									$('#displayResult').html("无相关 mse & rmsle 信息...");
								}
							});
						},
						error:function(){
							Toast.error("mission fail!");
							$('#displayResult').html("出错了...");
						}
					});
				});
			});
	// 结果
			$('#hgResult').click(function(){
				$.ajax({
					url:"getComparisonOfNaiveBayesAndDecisionTree.txt",
					type:'post',
					success:function(data){
						$.ajax({
							url:"getDecisionTreeRegressionMseAndRmsle.php",
							type:'post',
							success:function(data){
								data = JSON.parse(data);
								$('#displayResult').html("mse均方误差:" + data[0]
									+ "<br>rmse均方根误差:" + data[1]);
								$('#displayResult').append('<img src="DecisionTree.png" alt="Decision Tree Result"/>');
							},
							error:function(){
								Toast.error("get mse & rmsle fail!");
								$('#displayResult').html("无相关 mse & rmsle 信息...");
							}
						});
					},
					error:function(){
						Toast.error("get info fail!");
						$('#displayResult').html("Fail!");
					}
				});
			});
	// 测试
			$('#hgTest').click(function(){
				$('#displayData').html('<form id="hgTestForm"><table class="table-hover table-bordered table-striped">'+
					'<caption data-toggle="modal" data-target="#regressionModal">Bike Renting-注意清图片缓存！！</caption>'+
					'<tr>'+
						'<th>instant</th>'+
						'<th>dteday</th>'+
						'<th>season</th>'+
						'<th>yr</th>'+
						'<th>mnth</th>'+
						'<th>hr</th>'+
						'<th>holiday</th>'+
						'<th>weekday</th>'+
						'<th>workingday</th>'+
						'<th>weathersit</th>'+
						'<th>temp</th>'+
						'<th>atemp</th>'+
						'<th>hum</th>'+
						'<th>windspeed</th>'+
						'<th>cnt</th>'+
					'</tr>'+
					'<tr>'+
						'<td>记录ID</td>'+
						'<td>时间</td>'+
						'<td>季节</td>'+
						'<td>年份</td>'+
						'<td>月份</td>'+
						'<td>当天时刻</td>'+
						'<td>是否为节假日</td>'+
						'<td>周几</td>'+
						'<td>当天是否为工作日</td>'+
						'<td>天气类型参数</td>'+
						'<td>气温</td>'+
						'<td>体感温度</td>'+
						'<td>湿度</td>'+
						'<td>风速</td>'+
						'<td>目标变量</td>'+
					'</tr>'+
					'<tr>'+
						'<td><input type="text" size="1" readonly="readonly" value="10000000"></td>'+
						'<td><input type="text" size="1" readonly="readonly" value="2016-05-14"></td>'+
						'<td><input type="text" size="2" value="1"></td>'+
						'<td><input type="text" size="2" readonly="readonly" value="5"></td>'+
						'<td><input type="text" size="2" value="5"></td>'+
						'<td><input type="text" size="2" value="22"></td>'+
						'<td><input type="text" size="2" value="1"></td>'+
						'<td><input type="text" size="2" value="3"></td>'+
						'<td><input type="text" size="2" value="0"></td>'+
						'<td><input type="text" size="2" value="0.3"></td>'+
						'<td><input type="text" size="2" value="0.24"></td>'+
						'<td><input type="text" size="2" value="0.99"></td>'+
						'<td><input type="text" size="2" value="0.81"></td>'+
						'<td><input type="text" size="2" value="0"></td>'+
						'<td><input type="text" size="2" value="58"></td>'+
					'</tr>'+
					'<tr>'+
						'<td><input type="text" size="1" readonly="readonly" value="1010101001"></td>'+
						'<td><input type="text" size="1" readonly="readonly" value="2016-05-14"></td>'+
						'<td><input type="text" size="2" value="1"></td>'+
						'<td><input type="text" size="2" readonly="readonly" value="5"></td>'+
						'<td><input type="text" size="2" value="12"></td>'+
						'<td><input type="text" size="2" value="23"></td>'+
						'<td><input type="text" size="2" value="1"></td>'+
						'<td><input type="text" size="2" value="3"></td>'+
						'<td><input type="text" size="2" value="0"></td>'+
						'<td><input type="text" size="2" value="0.22"></td>'+
						'<td><input type="text" size="2" value="0.122"></td>'+
						'<td><input type="text" size="2" value="0.50"></td>'+
						'<td><input type="text" size="2" value="0.48"></td>'+
						'<td><input type="text" size="2" value="0.22"></td>'+
						'<td><input type="text" size="2" value="180"></td>'+
					'</tr>'+
				'</table></form>');
				$('#displayButton').html('<button class="btn btn-success form-control" id="out">测试</button>');
				$('#displayResult').html('');
				$('#out').click(function(){
					Toast.success("Please Wait just a minute for the backend resource preparing the result!");
					$('#displayResult').html("请稍后...");
					var dataSerial = "";
					var i = 0;
					$(':input[type="text"]').each(function(){
						var temp = $(this).val();
						if(i == 0)
							dataSerial = temp;
						else if(i % 15 == 0)
							dataSerial = dataSerial + "\n" + temp;
						else
							dataSerial = dataSerial + "," + temp;
						i++;
					});
					var data = {"data": dataSerial};
					//alert(dataSerial);
					$.ajax({
						url:'regressionBikeTest.php',
						data:data,
						type:'post',
						success:function(data){
							Toast.success("Success!");
							$.ajax({
								url:"getDecisionTreeRegressionMseAndRmsle.php",
								type:'post',
								success:function(data){
									data = JSON.parse(data);
									$('#displayResult').html("mse均方误差:" + data[0]
										+ "<br>rmse均方根误差:" + data[1]);
									$('#displayResult').append('<img src="DecisionTreeTest.png" alt="Decision Tree Result"/>');
								},
								error:function(){
									Toast.error("get mse & rmsle fail!");
									$('#displayResult').html("无相关 mse & rmsle 信息...");
								}
							});
						},
						error:function(){
							Toast.error("mission fail!");
							$('#displayResult').html("出错了...");
						}
					});
				});
			});
// 回归-超导材料
	// 训练
			$('#chaodao').click(function(){
				$('#displayData').html('<table class="table-hover table-bordered table-striped">'+
					'<caption data-toggle="modal">超导材料温度预测</caption>'+
					'<tr>'+
						'<th>ID</th>'+
						'<th>Data</th>'+
					'</tr>'+
					'<tr>'+
						'<td>序号</td>'+
						'<td>回归数据</td>'+
					'</tr>'+
					'<tr>'+
						'<td>1</td>'+
						'<td>2.2677,5.7085,96.36,93.7,YBa2Cu3O6.92</td>'+
					'</tr>'+
					'<tr>'+
						'<td>4</td>'+
						'<td>2.1658,5.5815,103.19,104,YBa2Cu4O8(12GPa)</td>'+
					'</tr>'+
				'</table>');
				$('#displayButton').html('<button class="btn btn-success form-control" id="out">测试</button>');
				$('#displayResult').html('');
				$('#out').click(function(){
					Toast.success("Please Wait just a minute for the backend resource preparing the result!");
					$('#displayResult').html("请稍后...");
					$.ajax({
						url:"regressionConductive.php",
						type:"post",
						success:function(data){
							Toast.success("Success!");
							$.ajax({
								url:"getRegressionConductive.txt",
								type:'post',
								success:function(data){
									$('#displayResult').html(data);
									$('#displayResult').append('<img src="DecisionTreeConductive.png" alt="Decision Tree Conductive Material Result"/>');
								},
								error:function(){
									Toast.error("get info fail!");
									$('#displayResult').html("Fail!");
								}
							});
						}
					})
				});
			});
	// 结果
			$('#chaodaoResult').click(function(){
				$.ajax({
					url:"getRegressionConductive.txt",
					type:'post',
					success:function(data){
						$('#displayResult').html(data);
						$('#displayResult').append('<img src="DecisionTreeConductive.png" alt="Decision Tree Conductive Material Result"/>');
					},
					error:function(){
						Toast.error("get info fail!");
						$('#displayResult').html("Fail!");
					}
				});
			});
	// 调优
			$('#chaodaoDecisionTree').click(function(){
				$('#displayResult').html('<img src="DecisionTreeConductiveQualityBins.png" alt="Decision Tree Conductive Material Result Bins"/>');
				$('#displayResult').append('<img src="DecisionTreeConductiveQualityDepth.png" alt="Decision Tree Conductive Material Result Depth"/>');
			});
// 聚类-电影类型
	// 训练
			$('#jl').click(function(){
				$('#displayData').html('<table class="table-hover table-bordered table-striped col-md-8">'+
					'<caption data-toggle="modal" data-target="#clusterModal">Movie Lens 100k<br>u.data--ratings</caption>'+
					'<tr>'+
						'<th>User</th>'+
						'<th>Movie</th>'+
						'<th>Rating</th>'+
					'</tr>'+
					'<tr>'+
						'<td>用户ID</td>'+
						'<td>电影ID</td>'+
						'<td>评分</td>'+
					'</tr>'+
					'<tr>'+
						'<td>196</td>'+
						'<td>242</td>'+
						'<td>3</td>'+
					'</tr>'+
					'<tr>'+
						'<td>186</td>'+
						'<td>302</td>'+
						'<td>3</td>'+
					'</tr>'+
				'</table>'+
				'<table class="table-hover table-bordered table-striped">'+
					'<caption data-toggle="modal" data-target="#clusterModal">Movie Lens 100k<br>u.item--movies</caption>'+
					'<tr>'+
						'<th>Movie</th>'+
						'<th>Name</th>'+
						'<th>Year</th>'+
						'<th>URL</th>'+
						'<th>Type</th>'+
					'</tr>'+
					'<tr>'+
						'<th>电影ID</th>'+
						'<th>电影名称</th>'+
						'<th>年份</th>'+
						'<th>网址</th>'+
						'<th>类型</th>'+
					'</tr>'+
					'<tr>'+
						'<td>1</td>'+
						'<td>Toy Story (1995)</td>'+
						'<td>01-Jan-1995</td>'+
						'<td>http://us.imdb.com/M/title-exact?Toy%20Story%20(1995)</td>'+
						'<td>0|0|0|1|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0</td>'+
					'</tr>'+
					'<tr>'+
						'<td>2</td>'+
						'<td>GoldenEye (1995)</td>'+
						'<td>01-Jan-1995</td>'+
						'<td>http://us.imdb.com/M/title-exact?GoldenEye%20(1995)</td>'+
						'<td>0|1|1|0|0|0|0|0|0|0|0|0|0|0|0|0|1|0|0</td>'+
					'</tr>'+
				'</table>'+
				'<table class="table-hover table-bordered table-striped col-md-8">'+
					'<caption data-toggle="modal" data-target="#clusterModal">Movie Lens 100k<br>u.genre-catagory</caption>'+
					'<tr>'+
						'<th>Catarory</th>'+
						'<th>ID</th>'+
					'</tr>'+
					'<tr>'+
						'<th>电影类型</th>'+
						'<th>类型ID</th>'+
					'</tr>'+
					'<tr>'+
						'<td>unknown</td>'+
						'<td>0'+
					'</tr>'+
					'<tr>'+
						'<td>Action</td>'+
						'<td>1</td>'+
					'</tr>'+
				'</table>');
				$('#displayButton').html('<button class="btn btn-success form-control" id="out">测试</button>');
				$('#displayResult').html('');
				$('#out').click(function(){
					Toast.success("Please Wait just a minute for the backend resource preparing the result!");
					$('#displayResult').html("请稍后...");
					$.ajax({
						url:'kmeans.php',
						type:'post',
						success:function(data){
							Toast.success("Success!");
							$.ajax({
								url:"getWCSS.php",
								type:'post',
								success:function(data){
									$('#displayResult').html("WCSS:" + data);
									$('#displayResult').append('<img src="KMeans.png" alt="KMeans Result"/>');
								},
								error:function(){
									Toast.error("get WCSS fail!");
									$('#displayResult').html("无相关 WCSS 信息...");
								}
							});
							$.ajax({
								url:"getKMeansInfo.txt",
								type:'post',
								success:function(data){
									$('#displayResult').append(data);
								},
								error:function(){
									Toast.error("get info fail!");
									$('#displayResult').html("Fail!");
								}
							});
						},
						error:function(){
							Toast.error("mission fail!");
							$('#displayResult').html("出错了...");
						}
					});
				});
			});
	// 结果
			$('#jlResult').click(function(){
				$.ajax({
					url:"getWCSS.php",
					type:'post',
					success:function(data){
						$('#displayResult').html("WCSS:" + data);
						$('#displayResult').append('<img src="KMeans.png" alt="KMeans Result"/>');
					},
					error:function(){
						Toast.error("get WCSS fail!");
						$('#displayResult').html("无相关 WCSS 信息...");
					}
				});
				$.ajax({
					url:"getKMeansInfo.txt",
					type:'post',
					success:function(data){
						$('#displayResult').append(data);
					},
					error:function(){
						Toast.error("get info fail!");
						$('#displayResult').html("Fail!");
					}
				});
			});
	// 调优
			$('#jlKMeans').click(function(){
				$.ajax({
					url:"kmeansQuality.txt",
					type:'post',
					success:function(data){
						$('#displayResult').html(data);
					},
					error:function(){
						Toast.error("get info fail!");
						$('#displayResult').html("Fail!");
					}
				});
			});
		});
	</script>
</body>
</html>